home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Maclife 157
/
MACLIFE157-2001-09.ISO.7z
/
MACLIFE157-2001-09.ISO
/
Linux
/
MacOS Tools
/
BootX 1.2.2
/
Sources
/
src
/
common
/
extract_dev_tree.h
< prev
next >
Wrap
Text File
|
2001-07-23
|
2KB
|
73 lines
#ifndef __DEVICETREE_H__
#define __DEVICETREE_H__
#include <NameRegistry.h>
/* Structures that defines our copy of the Name Registry. This maps
exactly linux internal representation of the tree
*/
/* All this requires PowerPC alignement */
#pragma options align=power
typedef void *phandle;
typedef void *ihandle;
struct address_range {
unsigned int space;
unsigned int address;
unsigned int size;
};
struct interrupt_info {
int line;
int sense; /* +ve/-ve logic, edge or level, etc. */
};
struct reg_property {
unsigned int address;
unsigned int size;
};
struct translation_property {
unsigned int virt;
unsigned int size;
unsigned int phys;
unsigned int flags;
};
struct property {
char *name;
int length;
unsigned char *value;
struct property *next;
};
struct device_node
{
char *name; // To be remapped
char *type; // To be remapped
phandle node; // Nothing interesting here
int n_addrs; // Not initialised here
struct address_range *addrs; // Not initialised here
int n_intrs; // Not initialised here
struct interrupt_info *intrs; // Not initialised here
char *full_name; // To be remapped
struct property *properties; // To be remapped
struct device_node *parent; // To be remapped
struct device_node *child; // To be remapped
struct device_node *sibling; // To be remapped
struct device_node *next; // To be remapped (next device of same type)
struct device_node *allnext; // To be remapped (next in list of all nodes)
};
// Prototypes of exported functions
extern OSStatus copy_device_tree(Ptr where, unsigned long *size, unsigned long *outMainDispOffset);
// Exported globals (options)
extern int device_tree_skip_macos; // Skip MacOS drivers
extern int device_tree_max_prop_length; // Max copied property length
#pragma options align=reset
#endif